<template>
  <div class="dashboard-container">
    <div class="dashboard-text">欢迎{{ name }}登陆如期业务管理系统</div>

    <p>• 所在部门：{{ loginInfo.department }}</p>
    <p>• 本次登录：{{ loginInfo.loginTime }}</p>
    <p>• 登录地区：{{ loginInfo.loginAddress }}</p>
    <p>• 上次登录：{{ loginInfo.lastLoginTime }}</p>

  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  data() {
    return {
      loginInfo: {
        department: '产品运营中心',
        loginTime: new Date(),
        loginAddress: '广东省深圳市 (IP：183.14.135.1)',
        lastLoginTime: new Date()
      }
    }
  }
}

</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
